@echo off

set WORKSPACE=.

set LUBAN_DLL=%WORKSPACE%\Luban\Luban.dll
set CONF_ROOT=%WORKSPACE%

dotnet %LUBAN_DLL% ^
    -t all ^
    -c typescript-json ^
    -d json  ^
    --conf %CONF_ROOT%\luban.conf ^
    -x outputCodeDir=.\output\code ^
    -x outputDataDir=.\output\json 

del ..\assets\script\src\Data\Types.ts
del ..\assets\res\public\data\*.json

copy /Y .\output\code\schema.ts ..\assets\scripts\Data\Types.ts
copy /Y .\output\json ..\assets\resources\data
pause